-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: do not set read_consistency for queries #664
Conversation
In Cloud Datastore ancestor queries are intended to be strong by default (https://cloud.google.com/datastore/docs/concepts/structuring_for_strong_consistency) . In Cloud Firestore in Datastore mode, all queries should be strongly consistent by default (https://cloud.google.com/datastore/docs/upgrade-to-firestore).
Hi @sorced-jim , Can you help me understand the problem being solved here? If you wanted to open an issue explaining a bug in NDB and marking this PR as fixing that issue, that would be helpful. Thank you! |
Chris, the problem being solved is that NDB is incorrectly setting the default query consistency as noted from the documented links. In general Cloud Datastore or Cloud Firestore libraries should avoid duplicating service default (what is attempted currently with the code). For Cloud Firestore in Datastore mode, all queries should be strongly consistency until the user explicitly requests an eventually consistent request. With the current version of Cloud NDB this is not true because the default read consistency is set instead of doing what other client libraries do and let the service select the default. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
In Cloud Datastore ancestor queries are intended to be strong by default
(https://cloud.google.com/datastore/docs/concepts/structuring_for_strong_consistency) .
In Cloud Firestore in Datastore mode, all queries should be strongly
consistent by default (https://cloud.google.com/datastore/docs/upgrade-to-firestore).
closes #666